﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMaster.Master" AutoEventWireup="true"
    CodeBehind="EditCreate.aspx.cs" Inherits="RestaurentReviewWeb.Admin.EditCreate" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script type="text/javascript">
    var txtLat = '<%=txtLatitude.UniqueID %>';
    var txtLong = '<%=txtLongitude.UniqueID %>';


    function _fillTextBox(overlay, point) {
        if (point) {
            var latitude = document.getElementById("ctl00_MainContent_txtLatitude");
            latitude.value = point.y;
            var longitude = document.getElementById("ctl00_MainContent_txtLongitude");
            longitude.value = point.x;
            
            

        }
    }
</script>
    <div style="width: 460px; float:left">
        <fieldset class="register">
            <legend>Restaurent Information</legend>
            <p>
                <asp:Label ID="TitleLable" runat="server" Text="Name" AssociatedControlID="txtRestaurantName" />
                <asp:TextBox runat="server" ID="txtRestaurantName" MaxLength="100" CssClass="textEntry" />
                <asp:RequiredFieldValidator ID="reqValtxtRestaurantName" runat="server" ControlToValidate="txtRestaurantName"
                    CssClass="failureNotification" ErrorMessage="Title is required." Text="*" SetFocusOnError="true"
                    ToolTip="Name is required." ValidationGroup="ValidationGroup"></asp:RequiredFieldValidator>
            </p>
            <p>
                <asp:Label ID="Label3" runat="server" Text="Area" AssociatedControlID="txtArea" />
                <asp:TextBox runat="server" ID="txtArea" MaxLength="100" CssClass="textEntry" />
                <asp:RequiredFieldValidator ID="RequiredCode" runat="server" ControlToValidate="txtArea"
                    CssClass="failureNotification" ErrorMessage="Area is required." Text="*" SetFocusOnError="true"
                    ToolTip="Area is required." ValidationGroup="ValidationGroup"></asp:RequiredFieldValidator>
            </p>
            <p>
                <asp:Label ID="Label2" runat="server" Text="Address" AssociatedControlID="txtAddress" />
                <asp:TextBox runat="server" ID="txtAddress" MaxLength="256" CssClass="textEntry" />
                <asp:RequiredFieldValidator ID="reqValtxtAddress" runat="server" ControlToValidate="txtAddress"
                    CssClass="failureNotification" ErrorMessage="Area is required." Text="*" SetFocusOnError="true"
                    ToolTip="Area is required." ValidationGroup="ValidationGroup"></asp:RequiredFieldValidator>
            </p>
            <p>
                <asp:Label ID="Label1" runat="server" Text="Latitude" AssociatedControlID="txtLatitude" />
                <asp:TextBox runat="server" ID="txtLatitude" MaxLength="100" CssClass="textEntry" />
            </p>
            <p>
                <asp:Label ID="Label6" runat="server" Text="Longitude" AssociatedControlID="txtLongitude" />
                <asp:TextBox runat="server" ID="txtLongitude" MaxLength="100" CssClass="textEntry" />
            </p>
            <p>
                <asp:Label ID="Label4" runat="server" Text="Description" AssociatedControlID="descriptionTxt" />
                <asp:TextBox runat="server" ID="descriptionTxt" TextMode="MultiLine" Rows="3" CssClass="textEntry" />
            </p>
            <p>
                <asp:Label ID="Label5" runat="server" Text="Image" />
                <asp:FileUpload runat="server" ID="fuProduct" />
            </p>
        </fieldset>
        <p class="saveButton">
            <asp:Button ID="SaveCC" runat="server" Width="80px" Text="Save" OnClick="Save_Click"
                ValidationGroup="ValidationGroup" />
        </p>
    </div>
    <div id="divGmapControl" style="float: right">
        <artem:GoogleMap ID="googleMapView" Key="ABQIAAAAdpvjaR4Mz7WSsTIpHOBu2BTx0zW8syyjCLakKpVZEisovZvRkxQK_TUOB7_fcDtaCFe8B5LZuwz_GA"
            runat="server" Width="400" DefaultMapView="Normal" Height="400" Latitude="23.7451" Longitude="90.3957"
            Zoom="13" OnClientClick="_fillTextBox" EnableGoogleMapState="true" BorderStyle="Solid"
            BorderColor="#999999" BorderWidth="1" ZoomPanType="Large">
        </artem:GoogleMap>
        <div id="divSupportingItems" style="display: block">
            <asp:TextBox ID="txtLat" runat="server"></asp:TextBox><br />
            <asp:TextBox ID="txtLong" runat="server"></asp:TextBox><br />
            <asp:TextBox ID="txtRadius" runat="server"></asp:TextBox><br />
            <%--<asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" />--%>
            <asp:TextBox ID="txtLastLatitude" runat="server" EnableViewState="true" Text="40"></asp:TextBox>
            <asp:TextBox ID="txtLastLongitude" runat="server" EnableViewState="true" Text="-74"></asp:TextBox>
        </div>
    </div>
</asp:Content>
